class PageController < ApplicationController
  caches_page :home, :about, :rates, :points, :policies
  def home
    #present_page "home"
  end

  def fleet
    #present_page "fleet"
  end

  def rates
    #present_page "rates"
  end

  def points
    #render that page
  end
  
  def policies
    #render that page
  end
  
  def about
    #present_page "about"
  end

  def reserve
    @reservation = Reservation.new
  end
  
  def reserve_now
    @reservation = Reservation.new(params[:reservation])
    if @reservation.save
      ReservationMailer.deliver_reservation_mail(@reservation)
      flash[:notice] = "Reservation has been successful. An agent will contact you shortly."
      respond_to do |format|
        format.html { redirect_to :action => "reserve" }
        format.js
      end
    else
      render :action => "reserve"
    end
  end
  
  def feedback
      @feedback = Feedback.new
  end
  
  def send_feedback
      @feedback = Feedback.new(params[:feedback])
      if @feedback.save
          FeedbackMailer.deliver_feedback_mail(@feedback)
          flash[:notice] = "Thank you for your feedback."
          respond_to do |format|
              format.html { redirect_to :action => "feedback" }
              format.js
          end
      else
          render :action => "feedback"
      end 
  end
end